package simple15;

import simple15.jdk.Customer;
import simple15.jdk.Mango;

/**
 * jdk 的观察者模式
 * 顾客关注了芒果,到货时通知他们
 */
public class Simple {
    public static void main(String[] args) {
        Mango attentions = new Mango("芒果");
        attentions.addObserver(new Customer("张三"));
        attentions.addObserver(new Customer("李四"));
        attentions.addObserver(new Customer("王五"));
        attentions.addObserver(new Customer("赵六"));

        attentions.perform();
    }
}
